/*
 * Copyright © 2004-2014 chenYuan. All rights reserved.
 * @Website:wwww.jspx.net
 * @Mail:39793751@qq.com
 * @author: chenYuan , 陈原
 * @License: Jspx.net Framework Code is open source (LGPL)，Jspx.net Framework 使用LGPL 开源授权协议发布。
 * @jvm:jdk1.6+  x86/amd64
 *
 */
package com.jspx.sober.table;

import com.jspx.sober.annotation.Column;
import com.jspx.utils.StringUtil;
import java.io.Serializable;
import java.util.Date;


public abstract class OperateTable implements Serializable
{
    @Column(caption = "操作人昵称", length = 50, notNull = true)
    protected String putName = StringUtil.empty;
    
    @Column(caption = "操作人员", notNull = true)
    protected long putUid = 0;

    @Column(caption = "IP地址", length = 20, notNull = true, defaultValue = "127.0.0.1")
    protected String ip = "127.0.0.1";

    @Column(caption = "创建时间", notNull = true)
    protected Date createDate = new Date();


    public String getPutName() {
        return putName;
    }

    public void setPutName(String putName) {
        this.putName = putName;
    }

    public long getPutUid() {
        return putUid;
    }

    public void setPutUid(long putUid) {
        this.putUid = putUid;
    }

    public String getIp()
    {
        return ip;
    }

    public void setIp(String ip)
    {

        if (ip!=null && ip.startsWith("/")) ip = ip.substring(1);
        this.ip = ip;
    }

    public Date getCreateDate()
    {
        return createDate;
    }

    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

}